#pragma once
#define __NR_ni_syscall 0
#define __NR_console_putc 1
#define __NR_console_puts 2
#define __NR_slot_copy 3
#define __NR_process_create 4
#define __NR_process_exit 5
#define __NR_thread_create 6
#define __NR_thread_exit 7
#define __NR_vmo_create 8
#define __NR_vmo_write 9
#define __NR_vmo_read 10
#define __NR_vmo_map 11
#define __NR_vmo_map_to_process 12
#define __NR_vmo_destory 13
#define __NR_register_server 14
#define __NR_register_named_server 15
#define __NR_register_client 16
#define __NR_register_client_by_name 17
#define __NR_ipc_call 18
#define __NR_ipc_return 19
#define __NR_nanosleep 20
#define __NR_clock_get 21
#define __NR_clock_get_monotonic 22
#define __NR_ticks_get 23
#define __NR_ticks_per_second 24
#define __NR_deadline_after 25
#define __NR_yield 26
#define __NR_futex_wait 27
#define __NR_futex_wake 28
#define __NR_object_wait_many 29
#define __NR_object_signal 30
#define __NR_block_read 31
#define __NR_block_write 32
#define __NR_block_capacity 33
#define __NR_block_size 34
#define __NR_block_count 35
#define __NR_framebuffer_create 36
#define __NR_framebuffer_get_info 37
#define __NR_framebuffer_present 38
#define __NR_event_create 39
#define __NR_event_read 40
#define __NR_fifo_write 41
#define __NR_fifo_read 42
#define __NR_fifo_create 43
#define __NR_fifo_destory 44
#define __NR_syscalls 45

#ifdef SYSCALL_IMPL

extern void sys_ni_syscall();
extern void sys_console_putc();
extern void sys_console_puts();
extern void sys_slot_copy();
extern void sys_process_create();
extern void sys_process_exit();
extern void sys_thread_create();
extern void sys_thread_exit();
extern void sys_vmo_create();
extern void sys_vmo_write();
extern void sys_vmo_read();
extern void sys_vmo_map();
extern void sys_vmo_map_to_process();
extern void sys_vmo_destory();
extern void sys_register_server();
extern void sys_register_named_server();
extern void sys_register_client();
extern void sys_register_client_by_name();
extern void sys_ipc_call();
extern void sys_ipc_return();
extern void sys_nanosleep();
extern void sys_clock_get();
extern void sys_clock_get_monotonic();
extern void sys_ticks_get();
extern void sys_ticks_per_second();
extern void sys_deadline_after();
extern void sys_yield();
extern void sys_futex_wait();
extern void sys_futex_wake();
extern void sys_object_wait_many();
extern void sys_object_signal();
extern void sys_block_read();
extern void sys_block_write();
extern void sys_block_capacity();
extern void sys_block_size();
extern void sys_block_count();
extern void sys_framebuffer_create();
extern void sys_framebuffer_get_info();
extern void sys_framebuffer_present();
extern void sys_event_create();
extern void sys_event_read();
extern void sys_fifo_write();
extern void sys_fifo_read();
extern void sys_fifo_create();
extern void sys_fifo_destory();

void *sys_call_table[__NR_syscalls] = {
	[__NR_ni_syscall] = sys_ni_syscall,
	[__NR_console_putc] = sys_console_putc,
	[__NR_console_puts] = sys_console_puts,
	[__NR_slot_copy] = sys_slot_copy,
	[__NR_process_create] = sys_process_create,
	[__NR_process_exit] = sys_process_exit,
	[__NR_thread_create] = sys_thread_create,
	[__NR_thread_exit] = sys_thread_exit,
	[__NR_vmo_create] = sys_vmo_create,
	[__NR_vmo_write] = sys_vmo_write,
	[__NR_vmo_read] = sys_vmo_read,
	[__NR_vmo_map] = sys_vmo_map,
	[__NR_vmo_map_to_process] = sys_vmo_map_to_process,
	[__NR_vmo_destory] = sys_vmo_destory,
	[__NR_register_server] = sys_register_server,
	[__NR_register_named_server] = sys_register_named_server,
	[__NR_register_client] = sys_register_client,
	[__NR_register_client_by_name] = sys_register_client_by_name,
	[__NR_ipc_call] = sys_ipc_call,
	[__NR_ipc_return] = sys_ipc_return,
	[__NR_nanosleep] = sys_nanosleep,
	[__NR_clock_get] = sys_clock_get,
	[__NR_clock_get_monotonic] = sys_clock_get_monotonic,
	[__NR_ticks_get] = sys_ticks_get,
	[__NR_ticks_per_second] = sys_ticks_per_second,
	[__NR_deadline_after] = sys_deadline_after,
	[__NR_yield] = sys_yield,
	[__NR_futex_wait] = sys_futex_wait,
	[__NR_futex_wake] = sys_futex_wake,
	[__NR_object_wait_many] = sys_object_wait_many,
	[__NR_object_signal] = sys_object_signal,
	[__NR_block_read] = sys_block_read,
	[__NR_block_write] = sys_block_write,
	[__NR_block_capacity] = sys_block_capacity,
	[__NR_block_size] = sys_block_size,
	[__NR_block_count] = sys_block_count,
	[__NR_framebuffer_create] = sys_framebuffer_create,
	[__NR_framebuffer_get_info] = sys_framebuffer_get_info,
	[__NR_framebuffer_present] = sys_framebuffer_present,
	[__NR_event_create] = sys_event_create,
	[__NR_event_read] = sys_event_read,
	[__NR_fifo_write] = sys_fifo_write,
	[__NR_fifo_read] = sys_fifo_read,
	[__NR_fifo_create] = sys_fifo_create,
	[__NR_fifo_destory] = sys_fifo_destory,
};
#endif
